<% content_for :mid do %>
<div id="midnav_left"></div>
<div id="midnav_back">
<div id="notice">
<%= list_notice(flash[:notice]) %>
</div>
</br>
</br>
<div>
  <strong><%= link_to "讨论区",:controller=>"forum",:action=>"index" %></strong>
</div>
</div>
<div id="midnav_right"></div>
<% end %>
<table width="670" border="0" cellpadding="0" cellspacing="0"
	align="center">
	<tr height="20" class="bluetext">
		<td width="30">&nbsp;</td>
		<td width="120" align="left"><strong>名称</strong></td>
		<td width="100" align="left"><strong>数量</strong></td>
		<td width="300" align="left"><strong>主题</strong></td>
		<td width="130" align="left"><strong>最后更新</strong></td>
	</tr>
	<tr>
		<td colspan="5"><div class="dot_dash"></div></td>
	</tr>
	<%odd_or_even = 0 
		for forum in @forums 
		odd_or_even = 1 - odd_or_even%>
	<tr height="30">
		<td class="ListLine<%= odd_or_even %>" align="left">
		<% unless @activeuser.guest?%>
		<% user=User.find_by_id(@activeuser.user_id)  %>
		<% end %>
		<% if user&&user.login_at<forum.updated_at%>
          <%= image_tag "comment.gif", :class => "icon green", :title => "有新话题发表了！" %>
        <% else %>
          <%= image_tag "comment.gif", :class => "icon grey", :title => "欢迎回来！" %>
        <% end %></td>
		<td class="ListLine<%= odd_or_even %>" align="left"><strong><%= link_to h(forum.name), :controller=>"forum", :action=>"read_forum", :id=>forum.id %></strong></td>
		<td class="ListLine<%= odd_or_even %>" align="left"><%=forum.topics_count%>个话题</td>
		<td class="ListLine<%= odd_or_even %>" align="left"><%=forum.description||"&nbsp;"%></td>
		<td class="ListLine<%= odd_or_even %>" align="left"><%=forum.updated_at.strftime("%y年%m月%d日-%H:%M")%></br>
		由&nbsp;<%=show_user_tag(forum.last_user)%></td>
	</tr>
	<% end-%>
</table>